package com.ethink.warehouse.common.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ethink.warehouse.api.info.WarehouseBookInfo;
import org.apache.ibatis.annotations.Mapper;
import com.ethink.warehouse.common.entity.WarehouseBook;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 仓库主仓账册 Mapper接口
 *
 * @author default
 * @date 2022-11-01
 */
@Mapper
public interface WarehouseBookMapper extends BaseMapper<WarehouseBook> {

    /**
     * 根据主仓ID查询列表
     *
     * @param warehouseId
     * @return
     */
    List<WarehouseBookInfo> getWarehouseBookByWarehouseId(@Param("warehouseId") Long warehouseId);

    /**
     * 详情
     *
     * @param id
     * @return
     */
    WarehouseBookInfo getWarehouseBookById(@Param("id") Long id);

    /**
     * 根据分仓编码获取账册详情
     *
     * @param subWarehouseCode
     * @return
     */
    WarehouseBookInfo getWarehouseBookBySubWarehouseCode(@Param("subWarehouseCode") String subWarehouseCode);

}